fix: replace hourly scheduled deploy with per-push deploy on production#1814
fix: replace hourly scheduled deploy with per-push deploy on production#1814
Conversation
🛑 Protected Paths ModifiedThis PR modifies 2 protected file(s) that control agent behavior, CI pipelines, or validation logic. These changes require human review before merging. CI workflows (.github/workflows/)
Action required: Add the
|
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR consolidates production deployment logic from a broken scheduled workflow into the main CI pipeline. The new deploy job triggers a Vercel production deployment after CI succeeds on the production branch, while removing the obsolete hourly schedule that was firing but being silently ignored by Vercel's ignoreCommand configuration. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
🤖 PR Patrol ran for 101s (40 max turns, model: sonnet). Issues detected: ci-failure, missing-testplan, missing-issue-ref Result:
Action needed from a human: Add the |
|
🤖 PR Patrol ran for 80s (40 max turns, model: sonnet). Issues detected: ci-failure, missing-issue-ref Result: CI Failure ( Missing Issue Reference: Found issue #1679 ("scheduled-deploy.yml is likely broken after production-branch switch") which directly matches this PR's purpose. Added |
| run: | | ||
| if [ -z "${{ secrets.VERCEL_DEPLOY_HOOK_URL }}" ]; then | ||
| echo "::error::VERCEL_DEPLOY_HOOK_URL secret is not set." | ||
| echo "Go to Vercel Dashboard → Project → Settings → Git → Deploy Hooks" |
There was a problem hiding this comment.
can we move some of this to TS? This seems error prone
|
🤖 PR Patrol ran for 106s (40 max turns, model: sonnet). Issues detected: ci-failure Result: Summary: Neither failure is fixable by code changes:
|
Remove scheduled-deploy.yml (hourly cron) and add a deploy job directly in ci.yml that fires after CI passes on pushes to the production branch. Fixes a silent bug where the hourly hook was likely configured for branch 'main', causing Vercel's ignoreCommand to cancel every build (it only allows 'production' builds). The new setup deploys immediately when a release PR merges, with no unnecessary hourly overhead. Also update vercel.json note to reflect the new flow. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2601a4f to
8a0d4e5
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/ci.yml:
- Around line 339-340: The production deploy job currently only waits for the ci
job (needs: [ci]) and should also gate on the migrate-test job; update the needs
array from [ci] to [ci, migrate-test] (i.e., change needs: [ci] to needs: [ci,
migrate-test]) so the job will block until both ci and migrate-test succeed, and
ensure the migrate-test job name matches exactly.
- Line 340: The new workflow condition for production deploys omits the existing
automation pause check, so add back a guard that prevents runs when
vars.AUTOMATION_PAUSED is set (e.g., require vars.AUTOMATION_PAUSED != 'true' or
similar) alongside the existing github.ref == 'refs/heads/production' and
github.event_name == 'push' checks; update the if condition in the CI job (the
line using github.ref and github.event_name) to include the
vars.AUTOMATION_PAUSED check so pushes to production do not trigger when
automation is paused.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: bbe1bf43-945d-4cc2-929a-c4e153fc57cb
📒 Files selected for processing (3)
.github/workflows/ci.yml.github/workflows/scheduled-deploy.ymlapps/web/vercel.json
💤 Files with no reviewable changes (1)
- .github/workflows/scheduled-deploy.yml
- Add `migrate-test` to deploy job's `needs` so production deploys cannot proceed if DB migration tests fail - Add `vars.AUTOMATION_PAUSED != 'true'` guard to prevent deploy when automation is intentionally paused (matches the previous scheduled-deploy.yml behaviour) Addresses CodeRabbit review comments on PR #1814. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
🤖 PR Patrol ran for 214s (40 max turns, model: sonnet). Issues detected: ci-failure, bot-review-major Result: Two changes to
|
Problem
The hourly
scheduled-deploy.ymlwas silently not deploying. When PR #1739 disabled Vercel's GitHub integration (github.enabled: false), it became the sole deploy path — but the deploy hook was likely configured for themainbranch. Thevercel.jsonignoreCommand only allows builds for theproductionbranch, so every hourly trigger was being cancelled by Vercel.The scheduled-deploy workflow showed "success" because it only checks that the HTTP trigger request returns 201, not that a build actually ran.
Fix
scheduled-deploy.yml— no more hourly crondeployjob toci.ymlthat fires after CI passes on pushes to theproductionbranch (i.e., when a release PR merges)vercel.jsonnote to clarify the deploy hook must be for theproductionbranchThe deploy hook in Vercel was updated manually to
Branch: productionandVERCEL_DEPLOY_HOOK_URLsecret was updated.Why this is better
Test plan
productionand verify thedeployjob runs in CI and triggers a Vercel buildscheduled-deploy.ymlno longer appears in the Actions tabCloses #1679
Summary by CodeRabbit
Release Notes